function main() {
    var self = this;
    debugger
    let arr = this.data.id.split("_index");
    let rowIdex = arr.length === 2 ? parseInt(arr[1]) : 0;
    // 找到明细表格元素
    let dt = this.$$("detail_list_aqwze4");

    let cardValur = dt.$$getDataList()[rowIdex];


    if (cardValur.cascader_fr67xm){
        if (cardValur.cascader_fr67xm[1]) {
            let allComList = dt.data.props.list[rowIdex].children
            processEvent(cardValur.cascader_fr67xm[1], allComList);
        }else{
            self.$message.error("请选择小类！");
            let allComList = dt.data.props.list[rowIdex].children
            let cascader = allComList.find(item => item.id.indexOf("cascader_fr67xm") > -1);

            cascader.props.defaultValue.value = null;
        }
    }

}

function processEvent(eventId, allComList){

    // 分值模块
    let scoreBlock = allComList.find(item => item.id.indexOf("number_input_gngned") > -1);
    let saveScoreBlock = allComList.find(item => item.id.indexOf("number_input_ckc6c") > -1);



    // 处理选项
    let resultSelectBlock = allComList.find(item => item.id.indexOf("radio_fc88z5") > -1);

    // 处理大类id,大类名称
    let bixEventIdBlock = allComList.find(item => item.id.indexOf("number_input_4db1l4") > -1);
    let bixEventNameBlock = allComList.find(item => item.id.indexOf("text_input_7ejhlg") > -1);

    let eventIdBlock = allComList.find(item => item.id.indexOf("number_input_570o65") > -1);
    let eventNameBlock = allComList.find(item => item.id.indexOf("text_input_9bbpq7") > -1);


    let initParams = [{
        name: "eventTypeId",
        valueContent: eventId
    }
    ];
    api.DATA_SOURCE_EXECUTE("13a1fe78-e73a-44c6-9209-abe0688012b6", "api", initParams, [], "").then(res => {
        console.log(res);
        let eventJson = JSON.parse(res['result']).result[0];
        // 选择事项
        scoreBlock.props.defaultValue.value = eventJson.score;
        // 处理选项
        bixEventIdBlock.props.defaultValue.value = eventJson.mainTypeId;
        bixEventNameBlock.props.defaultValue.value = eventJson.mainTypeName;
        eventIdBlock.props.defaultValue.value = eventJson.eventTypeId;
        eventNameBlock.props.defaultValue.value = eventJson.eventTypeName;
        resultSelectBlock.props.behavior.value = "NORMAL"
        saveScoreBlock.props.defaultValue.value =  0 ;

        // 处理选项
        let options = [];
        if (eventJson.scoreType ==1){
            options = [
                { label: '合格', value: "1",disabled:false},
                { label: '不合格', value: "2", disabled: false }
            ];
        } else if (eventJson.scoreType == 2) {
            options = [{ label: '加分', value: "3", disabled: false},
                { label: '不加分', value: "4", disabled: false}];
        }
        resultSelectBlock.props.dataSource.options = options;

    }).catch(err => {
        console.error(err);
    });
}
